package com.bd08.flink.demo.zhang

import org.apache.flink.api.scala.{ExecutionEnvironment, createTypeInformation}

object LocalFileDemo extends App {
  val benv = ExecutionEnvironment.getExecutionEnvironment
  val localLine = benv.readTextFile("H:\\Module 14 - 项目部署\\demo1\\src\\main\\resources\\lines.txt")
  localLine.flatMap{_.toLowerCase.split("\\W+")filter{_.nonEmpty}}
    .map{(_,1)}
    .groupBy(0)
    .sum(1)
    .print()
}
